 <?php 
 
return array(
     'controllers' => array(
         'invokables' => array(
             'Album\Controller\Album' => 'Album\Controller\AlbumController',
         ),
     ),

     // The following section is new and should be added to your file
     'router' => array(
         'routes' => array(
             'album' => array(
                 'type'    => 'segment',
                 'options' => array(
                     'route'    => '[/:action][/:id]',
                     'constraints' => array(
                         'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                         'id'     => '[0-9]+',
                     ),
                     'defaults' => array(
                         'controller' => 'Album\Controller\Album',
                         'action'     => 'index',
                     ),
                 ),
             ),
            'pager'=>array(
                     	'type'    =>  'segment',
                        'options' => array(
                            'route'    => '/album[/:page][/:id]',
                            'constraints' => array(
                                 'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                 'id'     => '[0-9]+',
                             ),
                            'defaults' => array(
                                 'controller' => 'Album\Controller\Album',
                                 'action'     => 'index',
                            ), 
                        ),
             ),
         ),
     ),
    'view_helper'=>array(
        'factories'=>array(
    	   'Requesthelper'=>function($sm){
    	       $helper =   new \Album\View\Helper\Requesthelper;
    	       $request    =   $sm->getServiceLocator()->get('Request');
    	       $helper->setRequest($request);
    	       return $helper;
    	   } 
        )                	
        
     ),
     'view_manager' => array(
         'template_path_stack' => array(
             'album' => __DIR__ . '/../view',
         ),
     ),
 );

  